FROM nibo/oracle-jdk:jdk-8u112
MAINTAINER Richard <nibocn@gmail.com>

WORKDIR /opt
ENV TZ=Asia/Shanghai
RUN mkdir /opt/app \
    && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
    && echo $TZ > /etc/timezone

EXPOSE 8086

ENV RESERVED_MEGABYTES 64
COPY questionnaire-service.jar /opt/app
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

CMD ["/entrypoint.sh"]

HEALTHCHECK --interval=10s --timeout=3s CMD curl -f http://localhost:8144/research/health || exit 1